.preview-loader-wrapper {
  width: 75%;
  max-width: 285px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  height: 100%;
  flex-wrap: nowrap;
  container: preview-loader / size;

  .progress-bar-root {
    width: 100%;
    margin-bottom: 8px;
  }

  .button {
    transition: none;
  }

  /* LandscapeLeft and LandscapeRight display */
  &.landscape {
    /* Small container query for landscape */
    @container preview-loader (height <= 170px) {
      .preview-loader-load-info {
        font-size: 0.6em;
      }

      .preview-loader-waiting-actions {
        font-size: 0.4em;
        flex-direction: row !important;
        justify-content: space-between;

        .codicon {
          font-size: 12px;
        }
      }

      .button-text {
        display: none;
      }
    }

    /* Medium container query for landscape */
    @container preview-loader (height >= 170px) and (height <= 300px) {
      .preview-loader-load-info {
        font-size: 0.8em;
      }

      .preview-loader-waiting-actions {
        font-size: 0.6em;
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 1fr 1fr;
        gap: 1em 1em;
      }
    }
  }

  &.portrait {
    /* Small container query for portrait */
    @container preview-loader (width <= 150px) {
      .preview-loader-load-info {
        font-size: 0.6em;
      }

      .preview-loader-waiting-actions {
        font-size: 0.5em;
      }

      .codicon {
        font-size: 14px;
      }

      .button {
        height: 25px;
        border-radius: 8px;
      }
    }

    /* Medium container query for portrait */
    @container preview-loader (width >= 150px) and (width <= 200px) {
      .preview-loader-load-info {
        font-size: 0.75em;
      }

      .preview-loader-waiting-actions {
        font-size: 0.7em;
        display: grid;
      }
    }
  }
}

.preview-loader-section {
  width: 100%;
}

.preview-loader-container {
  width: 100%;
  cursor: pointer;
}

.preview-loader-center-pad {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.preview-loader-load-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  color: white;
}

.preview-loader-waiting-actions {
  position: relative;
  bottom: 0;
  overflow: visible;
  display: flex;
  flex-direction: column;
  gap: 1em;
  align-items: stretch;
  width: 100%;
}

.preview-loader-waiting-actions a {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  align-content: stretch;
}

.preview-loader-button-group {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.preview-loader-message-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.preview-loader-spacer {
  display: flex;
}

.preview-loader-message {
  text-wrap: nowrap;
  width: 100%;
}

.preview-loader-submessage {
  width: 100%;
  margin-bottom: 8px;
}

.preview-loader-slow-progress {
  text-decoration: underline;
}

.preview-loader-stage-progress {
  color: var(--swm-startup-message);
}
